const safeHight=0;
const baseUrl='';
const PrefixZero=function(num, n) {
	return (Array(n).join(0) + num).slice(-n);
};
//时间戳转为日期
const getDate=function(timeStamp,form){
	const that=this;
	if(typeof(timeStamp)!='number')
		timeStamp=new Date().getTime();
	const time = new Date(timeStamp);
	if(form=='Y-M-D')
		return time.getFullYear() + '-' + that.PrefixZero(time.getMonth() + 1, 2) + '-' + that.PrefixZero(time.getDate(), 2);
	else
		return time.getFullYear() + '-' + that.PrefixZero(time.getMonth() + 1, 2) + '-' + that.PrefixZero(time.getDate(), 2) + ' ' 
			+ that.PrefixZero(time.getHours(), 2) +':' + that.PrefixZero(time.getMinutes(), 2);
};
export default{
	safeHight,
	baseUrl,
	PrefixZero,
	getDate
}